package com.briercliffe.settlers.core.domain;

import com.briercliffe.settlers.core.events.board.BoardDetails;

import java.util.Collection;

/**
 * User: briercliffe
 * Date: 10/9/13
 */
public class Board
{
    // ==================================================
    // class static data
    // ==================================================

    // ==================================================
    // class static methods
    // ==================================================
    public static Board fromBoardDetails(final BoardDetails iBoardDetails)
    {
        Board board = new Board();

        return board;
    }
    // ==================================================
    // instance data
    // ==================================================
    private BoardLayout mBoardLayout;
    // ==================================================
    // factories
    // ==================================================

    // ==================================================
    // constructors
    // ==================================================

    // ==================================================
    // public methods
    // ==================================================
    public Collection<Tile> getTilesForDiceRoll(final Dice iDice)
    {
        Collection<Tile> tiles = mBoardLayout.getAllTiles();
        for (Tile t : tiles)
        {
            if (t.getPlacedItem() instanceof TileCoin)
            {
                if (((TileCoin) t.getPlacedItem()).getValue() == iDice.getRollValue())
                {
                    tiles.add(t);
                }
            }
        }
        return tiles;
    }
    // ==================================================
    // non public methods
    // ==================================================

    // ==================================================
    // getters / setters
    // ==================================================
}
